@import './base.css';

/* 全局字体设置 - 皮影戏风格 */
body {
  font-family: 'Noto Serif SC', 'SimSun', serif;
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.8;
  background-image: url('./shadowplay_background.svg');
  background-size: 400px 400px;
  background-repeat: repeat;
}

/* 皮影戏风格的纸张质感 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(245, 245, 220, 0.8);
  z-index: -1;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  font-weight: normal;
  background-color: var(--color-background-soft);
  box-shadow: 0 0 30px rgba(166, 36, 36, 0.2);
  position: relative;
}

#app::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 1px solid var(--color-accent);
  opacity: 0.3;
  pointer-events: none;
}

/* 链接样式 */
a {
  text-decoration: none;
  color: var(--color-secondary);
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: var(--color-primary);
}

a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-weight: bold;
  margin-bottom: 1rem;
  position: relative;
}

h2 {
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
}

/* 皮影戏风格的装饰边框 */
.container {
  padding: 2rem;
  position: relative;
}

.container::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid var(--color-border);
  opacity: 0.3;
  pointer-events: none;
}

/* 容器样式 */
.container {
  padding: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  #app {
    padding: 0;
  }
  
  .container {
    padding: 1rem;
  }
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--color-border);
  transition: all 0.3s ease;
  position: relative;
}

img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(166, 36, 36, 0.2), 0 0 0 1px var(--color-accent);
}

/* 为图片添加皮影戏风格的边框装饰 */
img::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 1px solid var(--color-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

img:hover::after {
  opacity: 0.5;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #8c1e1e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn::after {
  display: none;
}
